package org.example.service.impl;

import org.example.dao.UserDao;
import org.example.domain.User;
import org.example.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserDao userdao;
    @Override
    public List<User> getAllUsers() {
        return userdao.getAllUsers();
    }

    @Override
    public void deleteById(String userId) {
        userdao.delById(userId);
    }

    @Override
    public void addUser(User user) {
        userdao.addUser(user);
    }
}
